home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-10-09 | 439 b | 19 lines | [TEXT/RLAB] |
- //----------------------------------------------------------------------
- //
- // finite
- //
- // Syntax: a=finite(b)
- //
- // This routines returns a matrix containing a 1 if the corresponding
- // element is finite (i.e., not Inf or NaN) and a 0 if it is either
- // Inf or NaN.
- //
- // Original Author: Jeff Layton
-
- //----------------------------------------------------------------------
-
- finite = function(b)
- {
- return !(isinf (b) + isnan (b))
- };
-